package top.lishuoboy.boot03web.a4.bean;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Builder;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Data
@Builder
@JsonRootName("User2")                          //  json、xml 根标签名
@JacksonXmlRootElement(localName = "User")      //  xml 根标签名，优先级高于@JsonRootName
public class User {
    @JsonProperty("id2")                        // json、xml属性标签名
    @JacksonXmlProperty(localName = "id")       // xml属性标签名，优先级高于@JsonProperty
    private String id;
    private String name;
    /**
     * 爱好
     */
    private String hobby;
    private String[] hobby2;
    private List<String> hobby3;

    private MultipartFile multipartFile;  // 【post传文件才有】
}
